<template>
  <div>
    <van-picker
      title="标题"
      show-toolbar
      :columns="columns"
      @confirm="onConfirm"
      @cancel="$emit('close')"
    />
  </div>
</template>
           
<script>
 import {editUserprofile_api} from "@/api/article/index";

export default {
  data() {
    return {
         columns: ["男", "女"]
    };
  },
  methods:{
   async onConfirm(value,index) {
      // console.log(value,index);
      const {data:res}=await editUserprofile_api({
        gender:index
      })
      this.$emit('gender',res.data.gender)
    }
  }
};
</script>
<style scoped lang="less">

</style>